package com.common.zrd.validation.errorcode;

/**
 * author: zrd
 * @Date: 2019/11/4 17:58
 * @Description:
 */
public class BaseErrorCodes extends ErrorCodes {
    /**
     * {0}动作描述  {1}参数名称
     */
    public static final ErrorCode CHECK_ARG_NULL = custom("-40001", "{0}请求参数错误，参数{1}不能为空！");
    /**
     * {0}异常信息
     */
    public static final ErrorCode GET_NAME_ERROR = custom("-40002", "获取本机名失败!错误信息：{0}");
    /**
     * {0}动作描述
     */
    public static final ErrorCode DATABASE_INSERT_ERROR = custom("-40101", "{0}数据库异常，保存入库失败!");
    /**
     * {0}动作描述  {1}异常描述
     */
    public static final ErrorCode DATABASE_UPDATE_ERROR = custom("-40102", "{0}数据库异常，更新库失败!原因：{1}");
    /**
     * {0}动作描述  {1}异常描述
     */
    public static final ErrorCode DATABASE_DELETE_ERROR = custom("-40103", "{0}数据库异常，删除数据失败!原因：{1}");
    /**
     * {0}动作描述  {1}异常描述  数据库异常，查询数据失败
     */
    public static final ErrorCode DATABASE_QUERY_ERROR = custom("-40104", "{0}数据库异常，查询数据失败!原因：{1}");


    public static final ErrorCode DATABASE_QUERY_ONE_ERROR = custom("-40105", "查询数据失败!原因：{0}");
    /**
     * {0}动作描述  {1}异常描述  校验数据库数据已存在
     */
    public static final ErrorCode DATA_DUPLICATION = custom("-40205", "{0}校验数据库数据已存在，【{1}】重复!");
    /**
     * s数据已经不存在
     */
    public static final ErrorCode THERE_IS_NO_DATA = custom("-40206", "{0}请求错误，该配置{1}不存在！");
    /**
     * 参数不在可选范围内
     */
    public static final ErrorCode PARAMETER_NOT_OPTIONAL = custom("-40207", "{0}请求参数错误，参数【{1}】不在可选范围内！!");
    public static final ErrorCode NOT_EQUEAL = custom("-40207", "{0}与{1}不相等！!");

    static {
        initializeMessages(BaseErrorCodes.class);
    }
}
